<template>
	<div>
		<el-row class="bg1">
			<el-col :span="24">
				<h3 class="baseHeader" style="text-align: left">DCU参数</h3>
				<!-- 搜索条件 -->
				<el-row>
					<el-form :inline="true" ref="doorForm" :model="doorForm" style="display: flex; padding: 0 4.1vw">
						<el-form-item prop="dcu" class="doorNuTxt" label="门控单元编号："
							style="margin-right: 2.6vw; margin-bottom: 0">
							<el-select v-model="doorForm.dcu" filterable multiple collapse-tags clearable
								placeholder="请选择" style="width: 12vw;min-width: 155px;" @change="doorChange">
								<el-checkbox v-model="checkOptions.checkAll" :style="{ padding: '5px 20px' }"
									:indeterminate="checkOptions.isIndeterminate" @change="handleCheckAllChange">
									全选
								</el-checkbox>
								<el-option v-for="(item, index) in options" :key="index" :label="item.dcu"
									:value="item.dcu"></el-option>
							</el-select>
						</el-form-item>
						<div class="baseInfoBtn" style="display: flex; justify-content: end">
							<el-button class="btn1" type="primary" @click="getDCUData()">读取</el-button>
							<el-button class="btn7" type="primary" @click="writeDCUNew()">写入</el-button>
							<el-button class="btn7" type="primary" @click="historyLoad()">加载</el-button>
							<el-button class="btn6" type="primary" @click="save()">保存</el-button>
							<el-button class="btn4" type="primary" v-loading.fullscreen.lock="fullscreenLoading"
								@click="exportHandle()">导出所有数据</el-button>
						</div>
					</el-form>
				</el-row>
				<div class="baseInfo">
					<div class="baseInfoContent">
						<el-form :inline="true" :model="baseForm">
						<el-row>
									<div class="baseInfo1">
										<el-form-item label="参数1：">
											<el-input-number v-model="baseForm.leftNowel"
												oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
												placeholder="" clearable type="number" :min='1' :max='6' :step='1'
												class="input-width"></el-input-number>
										</el-form-item>
										<span class="company company1" >(1~6)</span>
									</div>
									<div class="baseInfo1">
										<el-form-item label="参数2：">
											<el-input-number v-model="baseForm.rightNowel"
												oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
												placeholder="" clearable :min='1' :max='6' :step='1'
												class="input-width"></el-input-number>
										</el-form-item>
										<span class="company company1" >(1~6)</span>
									</div>
								</el-row>
							<el-row>
								<div class="baseInfo1 doorNu1">
									<el-form-item label="参数3：">
										<el-input-number v-model="baseForm.closeImpact" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" clearable
											:min='1' :max='6' :step='1'
											class="input-width"></el-input-number>
									</el-form-item>
									<span class="company company1">(1~6)</span>
								</div>
								<div class="baseInfo1 doorNu1">
									<el-form-item label="参数4：">
										<el-input-number v-model="baseForm.openImpact" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" clearable
											:min='1' :max='6' :step='1'
											class="input-width"></el-input-number>
									</el-form-item>
									<span class="company company1">(1~6)</span>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="遇障力：">
										<el-input-number v-model="baseForm.encounterNowel" :readonly="DCUStatus"
											clearable :min='0' :max='5' :step='1' class="input-width"></el-input-number>
									</el-form-item>
									<span class="company">级</span>
									<span class="company company1">(0~5级)</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="遇障回退距离：">
										<el-input-number v-model="baseForm.encounterRegressionDistance"
											:readonly="DCUStatus" clearable :min='0' :max='10' :step='1'
											class="input-width"></el-input-number>
									</el-form-item>
									<span class="company">cm</span>
									<span class="company company1">(0~10cm)</span>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="关门遇障次数：">
										<el-input-number v-model="baseForm.closeEncounterNum" :readonly="DCUStatus"
											clearable :min='1' :max='5' :step='1' class="input-width"></el-input-number>
									</el-form-item>
									<span class="company">次</span>
									<span class="company company1">(1~5次)</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="开门遇障次数：">
										<el-input-number v-model="baseForm.openEncounterNum" :readonly="DCUStatus"
											clearable :min='1' :max='1' :step='1' class="input-width"></el-input-number>
									</el-form-item>
									<span class="company">次</span>
									<span class="company company1">(1次)</span>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1 doorNu1">
									<el-form-item label="关门遇障等待时间：">
										<el-input-number v-model="baseForm.closeEncounterTime" :readonly="DCUStatus"
											clearable :min='1' :max='10' :step='1'
											class="input-width"></el-input-number>
									</el-form-item>
									<span class="company">s</span>
									<span class="company company1">(1~10s)</span>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1 doorNu1">
									<el-form-item label="蜂鸣器音量：">
										<el-input-number v-model="baseForm.buzzerGearSetting" :readonly="DCUStatus"
											placeholder="" clearable :min='1' :max='!readDataStatus?3:100'
											class="input-width"></el-input-number>
									</el-form-item>
									<span class="company">档位</span>
									<span class="company company1">(1~3档)</span>
								</div>
								<div class="baseInfo1 doorNu1">
									<el-form-item label="手解重关时间：">
										<el-input-number v-model="baseForm.macloseTime" :readonly="DCUStatus" clearable
											:min='10' :max='120' :step='1' class="input-width"></el-input-number>
									</el-form-item>
									<span class="company">s</span>
									<span class="company company1">(10~120s)</span>
								</div>
							</el-row>
							<el-row> </el-row>
							<el-row>
								<div class="baseInfo1 doorNu1">
									<el-form-item label="参数5：">
										<el-input-number v-model="baseForm.overProThre" type="number" step="1"
											:readonly="DCUStatus" clearable :min='1' :max='100' :step='1'
											class="input-width">
										</el-input-number>
									</el-form-item>
									<span class="company company1">(1~100)</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="端门报警时间：">
										<el-input-number v-model="baseForm.endAlarmTime" :readonly="DCUStatus" clearable
											:min='1' :max='20' :step='1' class="input-width"></el-input-number>
									</el-form-item>
									<span class="company">s</span>
									<span class="company company1">(1~20s)</span>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1 doorNu1">
									<el-form-item label="电磁锁档位：">
										<el-input-number v-model="baseForm.elockGearSetting" :readonly="DCUStatus"
											clearable :min='1' :max='!readDataStatus?3:100'
											class="input-width"></el-input-number>
									</el-form-item>
									<span class="company">档位</span>
									<span class="company company1">(1~3档)</span>
								</div>
								<div class="baseInfo1 doorNu1">
									<el-form-item label="是否有应急门：">
										<span v-if="baseForm.isHaveEmergencyDoor==1">是</span>
										<span v-else>否</span>
									</el-form-item>
								</div>
							</el-row>
						</el-form>
					</div>
				</div>
			</el-col>
		</el-row>
		<el-row class="bg1">
			<el-col :span="24">
				<h3 class="baseHeader" style="text-align: left">DCU信息</h3>
				<div class="baseInfo">
					<el-form :inline="true" ref="dateForm" :model="dateForm" style="display: flex; width: 100%">
						<el-form-item label="门控单元编号：">
							<el-select v-model="dateForm.DCU" filterable clearable placeholder="请选择DCU编号"
								@change="changeDCU()">
								<el-option v-for="(item, index) in options" :key="item.dcu" :label="item.dcu"
									:value="item.dcu"></el-option>
							</el-select>
						</el-form-item>
						<el-button class="btn1" type="primary" @click="getDateData()">读取</el-button>
						<div class="baseInfo1" style="width: auto;">
							<!-- <el-form-item label="生产日期：">
                <span>{{ dateForm.date ? dateForm.date : "0000-00-00" }}</span>
              </el-form-item> -->
							<el-form-item label="CPU1软件版本号：">
								<span>{{ version ? version : "无" }}</span>
							</el-form-item>
							<el-form-item label="CPU2软件版本号：">
								<span>{{ version1 ? version1 : "无" }}</span>
							</el-form-item>
						</div>
					</el-form>
				</div>
			</el-col>
		</el-row>
		<div style="display: flex;">
			<el-row class="bg1" style="width: 50%;margin-right: 10px;">
				<el-col :span="24" style="margin-right: 10px;">
					<h3 class="baseHeader" style="text-align: left">自学习</h3>
					<div class="baseInfo">
						<el-form :inline="true" ref="dateForm1" :model="dateForm1" style="display: flex; width: 100%">
							<el-form-item label="门控单元编号：">
								<el-select v-model="dateForm1.DCU" filterable multiple collapse-tags clearable
									placeholder="请选择DCU编号" @change="changeDCU1()"
									style="width: 12vw;min-width: 155px; height: 3.5vh">
									<el-checkbox v-model="checkOptions1.checkAll" :style="{ padding: '5px 20px' }"
										:indeterminate="checkOptions1.isIndeterminate" @change="handleCheckAllChange1">
										全选
									</el-checkbox>
									<el-option v-for="(item, index) in options" :key="item.dcu" :label="item.dcu"
										:value="item.dcu"></el-option>
								</el-select>
							</el-form-item>
							<el-button class="btn1" type="primary" @click="getSelfLearning()">自学习</el-button>
						</el-form>
					</div>
				</el-col>

			</el-row>
			<el-row class="bg1" style="width: 50%;">
				<el-col :span="24">
					<h3 class="baseHeader" style="text-align: left">设置应急门</h3>
					<div class="baseInfo">
						<el-form :inline="true" ref="dateForm2" :model="dateForm2" style="display: flex; width: 100%">
							<el-button class="btn1" type="primary" @click="yjSetting()">应急门配置</el-button>
						</el-form>
					</div>
				</el-col>
			</el-row>
		</div>

		<el-row class="bg2 bg3">
			<el-col :span="24">
				<div class="dcuTxt">
					<h3 class="baseHeader" style="text-align: left">DCU固件文件</h3>
					<div>
						<el-upload :data="paramsData" :headers="headers" :on-success="handleSuccess" :action="dcuurl"
							class="upload-demo" :show-file-list="false" :file-list="fileList" style="text-align: left;">
							<el-button type="primary">
								上传固件
							</el-button>
						</el-upload>
						<!-- <el-button class="newAdd" v-if="$hasPermission('sys:user:save')" type="primary"
							@click="addOrUpdateHandle()">新增</el-button> -->
					</div>
				</div>
				<div>
					<el-table v-loading="dataListLoading" :data="dataList" border
						@selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle"
						style="width: 100%">
						<el-table-column type="selection" header-align="center" align="center" width="50">
						</el-table-column>
						<el-table-column type="index" label="序号" header-align="center" align="center" width="50">
						</el-table-column>
						<el-table-column prop="name" label="DCU固件名称" header-align="center" align="center">
						</el-table-column>
						<el-table-column prop="packagePath" label="DCU固件路径" header-align="center" align="center">
						</el-table-column>
						<el-table-column prop="createDate" label="登记日期" header-align="center" align="center"
							width="180"></el-table-column>
						<!-- <el-table-column prop="sysUserName" label="登记人" header-align="center" align="center">
						</el-table-column> -->
						<el-table-column prop="doorList" label="失败门编号" header-align="center" align="center">
							<template slot-scope="scope">
								{{ scope.row.doorList }}
								<!-- <div class="progress-bar">
									<div class="progress-bg" :style="{ width: jdNumber }"></div>
								</div> -->
							</template>
						</el-table-column>
						<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center"
							width="300">
							<template slot-scope="scope">
								<div style="display: flex;justify-content:space-around;padding: 0 20px;">
									<el-button type="primary" round size="mini" :disabled="btnStatus"
										@click="upgrade(scope.row.packagePath, scope.row.id, false)">
										升级DCU</el-button>

									<!-- <el-button type="danger" round size="mini" @click="deleteHandleDCU(scope.row.id)">
										{{ $t("delete") }}
									</el-button> -->
								</div>
							</template>
						</el-table-column>
					</el-table>
					<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDCUpackageList">
					</add-or-update>
					<dcuUpgrade v-if="dcuUpgtadeVisible" ref="dcuUpgrade" @clearData="clearData" :jdNumber="jdNumber"
						@disabledTxt="disabledTxt">
					</dcuUpgrade>
				</div>
			</el-col>
		</el-row>
		<el-row class="bg2 bg3">
			<el-col :span="24">
				<h3 class="baseHeader" style="text-align: left">记录板版本号</h3>
				<div class="baseInfo">
					<el-form :inline="true" ref="jlbForm" :model="jlbForm" style="display: flex; width: 100%">
						<el-form-item label="请选择：">
							<el-select v-model="jlbForm.jlbData" filterable clearable placeholder="请选择配置">
								<el-option v-for="(item, index) in optionsJL" :key="item.value" :label="item.label"
									:value="item.value"></el-option>
							</el-select>
						</el-form-item>
						<el-button class="btn1" type="primary" @click="getJLBData()">读取</el-button>
						<div class="baseInfo1" style="width: auto;">
							<el-form-item label="CPU0软件版本号：">
								<span>{{ versionJL ? versionJL : "无" }}</span>
							</el-form-item>
							<el-form-item label="CPU1软件版本号：">
								<span>{{ versionJL1 ? versionJL1 : "无" }}</span>
							</el-form-item>
						</div>
					</el-form>
				</div>

			</el-col>
		</el-row>
		<oper-data v-if="operdataVisible" ref="operdataFrom" @refreshDataList="init"></oper-data>
		<history-or-update v-if="historyVisible" ref="historyForm" @refreshDataList="init" @getHistory="getHistory">
		</history-or-update>
		<el-dialog :visible.sync="saveVisible" title="DCU数据保存" :close-on-click-modal="false"
			:close-on-press-escape="false">
			<el-form :model="saveForm" ref="saveForm" :rules="saveRule" @keyup.enter.native="confirm()"
				label-width="200px">
				<el-form-item prop="name" label="DCU数据保存名称">
					<el-input v-model="saveForm.name" placeholder="DCU数据保存名称"></el-input>
				</el-form-item>
			</el-form>
			<template slot="footer">
				<el-button @click="saveVisible = false">{{ $t("cancel") }}</el-button>
				<el-button type="primary" @click="confirm()">{{
					$t("confirm")
				}}</el-button>
			</template>
		</el-dialog>
	</div>
</template>

<script>
	import debounce from "lodash/debounce";
	import mixinViewModule from "@/mixins/view-module";
	import AddOrUpdate from "./sysParam-add-or-update";
	import dcuUpgrade from "./dcuUpgrade.vue";
	import utils from "@/utils/utils";
	import Cookies from "js-cookie";
	import operData from "../oper/oper-data.vue";
	import historyOrUpdate from "../oper/oper-add-or-update.vue";
	import qs from 'qs'
	import {
		getOrder,
		getStep
	} from "@/utils";
	export default {
		mixins: [mixinViewModule],
		components: {
			AddOrUpdate,
			dcuUpgrade,
			operData,
			historyOrUpdate,
		},
		data() {
			return {
				jlbForm:{
					jlbData:''
				},
				optionsJL:[
					{
						label:'记录板A',
						value:1
					},
					{
						label:'记录板B',
						value:2
					}
				],
				mixinViewModuleOptions: {
					createdIsNeed: false,
					deleteURL: "",
					deleteIsBatch: true,
					activatedIsNeed: false,
					exportURL: "/psc/dcuparameters/export",
				},
				
				DCUoptions: [], //DCU的options
				stationOptions: [{
						value: 0,
						label: "上行",
					},
					{
						value: 1,
						label: "下行",
					},
					{
						value: 2,
						label: "上下行",
					},
				], //上下行
				baseForm: {
					leftNowel: undefined, //门机阻力
					rightNowel: undefined, //门机阻力
					closeImpact: undefined, //关门到位撞击力
					openImpact: undefined, //开门到位撞击力
					encounterNowel: undefined, //遇障力
					encounterRegressionDistance: undefined, //遇障回退距离
					closeEncounterNum: undefined, //关门遇障次数
					openEncounterNum: undefined, //开门遇障次数
					closeEncounterTime: undefined, //关门遇障等待时间
					openEncounterTime: undefined, //开门遇障等待时间
					buzzerGearSetting: undefined, //蜂鸣器音量
					macloseTime: undefined, //手解重关时间
					overProThre: undefined, //过流保护阈值
					endAlarmTime: undefined, //端门报警时间
					elockGearSetting: undefined, //电磁锁档位
					isHaveEmergencyDoor: 0,
				},
				stationSide: "", //上下行
				options: [],
				yjoptions: [], //应急门的数组
				type: Cookies.get("type"), //Cookies.get('type')
				DCUStatus: false,
				PEDCStatus: true,
				doorIndex: "", //门的编号,
				operdataVisible: false,
				dcuUpgtadeVisible: false,
				jdNumber: "", //进度条的数据显示
				checkOptions: {
					isIndeterminate: false,
					checkAll: false,
				},
				checkOptions1: {
					isIndeterminate: false,
					checkAll: false,
				},
				checkOptions2: {
					isIndeterminate: false,
					checkAll: false,
				},
				historyVisible: false,
				doorForm: {
					dcu: "",
				},
				dateForm: {
					DCU: "",
					date: "",
				},
				dateForm1: {
					DCU: "",
				},
				dateForm2: {
					DCU: "",
				},
				version: "", //CPU1版本号
				version1: "", //CPU2版本号
				saveVisible: false,
				saveForm: {
					name: "",
				},
				updateId: "", //升级的全局ID
				Arr: [],
				readDataStatus: false,
				btnStatus: false,
				headers: {
					'Authorization': Cookies.get('token')
				},
				dcuurl: window.SITE_CONFIG['apiURL'] + '/psc/packagemanage/uploader',
				paramsData: {
					type: 'dcu'
				},
				stepUp: 0, //上行门的step值
				stepDown: 0, //下行门的step值
				stationSide: 0, //选中上下行
				fileList: [],
				defaultStatus: false,
				versionJL: '',
				versionJL1: ''
			};
		},
		activated() {
			this.init();
		},
		mounted() {
			window.addEventListener('onmessageWSDCU', this.getSocketDataDCU);
			//window.addEventListener('onmessageWSPSC', this.getSocketDataPSC);
		},
		destroyed() {
			window.removeEventListener('onmessageWSDCU', this.getSocketDataDCU);
			//window.removeEventListener('onmessageWSPSC', this.getSocketDataPSC);
		},
		computed: {
			dataRule() {
				return {
					slide: [{
						required: true,
						message: "站台侧不为空",
						trigger: "blur"
					}],
				};
			},
			saveRule() {
				return {
					name: [{
						required: true,
						message: "DCU数据保存名称不能为空",
						trigger: "blur",
					}, ],
				};
			},
		},
		watch: {
			"baseForm.buzzerGearSetting": {
				handler(val) {
					// console.log(this.readDataStatus, '写入')
					if (val > 3 && !this.readDataStatus) {
						this.baseForm.buzzerGearSetting = "";
						return this.$message.error("蜂鸣器音量不能大于三档");
					}
				},
				deep: true,
				immediate: true,
			},
			"baseForm.elockGearSetting": {
				handler(val) {
					if (val > 3 && !this.readDataStatus) {
						this.baseForm.elockGearSetting = "";
						return this.$message.error("电磁锁档位上不能大于三档");
					}
				},
				deep: true,
				immediate: true,
			},
		},
		methods: {
			handleSuccess(res, file, fileList) {
				if (res.code == 0) {
					this.$message({
						message: '上传成功',
						type: 'success',
						duration: 500,
						onClose: () => {
							this.getDCUpackageList()
						}
					})
				}
			},
			disabledTxt(val) {
				this.btnStatus = val
				setTimeout(() => {
					this.btnStatus = false
				}, 20 * 1000)
			},
			getSocketDataDCU(res) {
				// console.log(res,'sysprams类型')
				if (res.detail.data) {
					this.handleMsg();
				}
			},

			init() {

				//获取门的信息
				var p0 = new Promise((resolve, reject) => {
					this.getdoorList(() => {
						resolve();
					});
				});
				var p1 = new Promise((resolve, reject) => {
					this.getDCUpackageList(() => {
						resolve();
					});
				});
				Promise.all([p0, p1]).then(() => {
					this.handleMsg();
					//this.handleMsgPSC();
					// this.getDCUData()
					// this.initEcharts()
				});
			},
			//门的编号
			getdoorList(callback) {
				this.DCUoptions = [];
				this.yjoptions = [];
				this.$http
					.get("/psc/door/getDoor")
					.then((res) => {
						//获取上下行数据要增加和减少的值-----2023年5月26日
						this.stepUp = getStep(res.data.data.up)
						this.stepDown = getStep(res.data.data.down)
						// console.log( this.stepUp,this.stepDown,'上下行的step的值')
						//获取上下行数据要增加和减少的值-----2023年5月26日
						if (this.stationSide == 1) {
							res.data.data.up.forEach((item) => {
								if (item.doorType == 1) {
									this.DCUoptions.push(item);
								}
							});
						} else if (this.stationSide == 0) {
							res.data.data.down.forEach((item) => {
								if (item.doorType == 1) {
									this.DCUoptions.push(item);
								}
							});
						}
						this.options = res.data.data.up.concat(res.data.data.down);
						for (var i = 0; i < this.options.length; i++) {
							if (this.options[i].doorType === 2) {
								this.yjoptions.push(this.options[i])
							}
							if (
								this.options[i].doorType === 0 ||
								this.options[i].doorType === 2
							) {
								this.options.splice(i, 1); // 将使后面的元素依次前移，数组长度减1
								i--; // 如果不减，将漏掉一个元素
							}
						}
						// this.baseForm.dcu = this.options[0].dcu
						if (this.options.length !== 0) {
							this.stationSide = this.options[0].type;
						}
						// console.log(this.yjoptions, '应急数据')
						if (callback) {
							callback();
						}
					})
					.then(() => {
						// this.getDCUData()
					});
			},
			// 流向全选
			handleCheckAllChange(e) {
				this.doorForm.dcu = e ? this.options.map((item) => item.dcu) : [];
				this.checkOptions.isIndeterminate = false;
			},
			// 流向全选
			handleCheckAllChange1(e) {
				this.dateForm1.DCU = e ? this.options.map((item) => item.dcu) : [];
				this.checkOptions1.isIndeterminate = false;
			},
			handleCheckAllChange2(e) {
				this.dateForm2.DCU = e ? this.yjoptions.map((item) => item.dcu) : [];
				this.checkOptions2.isIndeterminate = false;
			},
			//改变门的编号
			doorChange() {
				const nowLength = this.doorForm.dcu.length;
				this.checkOptions.isIndeterminate =
					nowLength > 0 && nowLength < this.options.length;
				this.checkOptions.checkAll = nowLength == this.options.length;
				this.$forceUpdate();
			},
			//升级DCU
			upgrade(path, id, status) {
				this.Arr = []
				this.dcuUpgtadeVisible = true;
				this.updateId = id;
				this.$nextTick(() => {
					this.$refs.dcuUpgrade.init(path, status);
				});
			},
			//改变DCU获取index的值
			changeDCU() {
				this.version = ''
				this.version1 = ''
				this.options.forEach((val, index) => {
					if (this.dateForm.DCU == val.dcu) {
						this.stationSide = val.stationSide
					}
				})
				// console.log(this.stationSide,this.version,'上下行的选择')
			},
			//改变自学习状态
			changeDCU1() {
				const nowLength = this.dateForm1.DCU.length;
				this.checkOptions1.isIndeterminate =
					nowLength > 0 && nowLength < this.options.length;
				this.checkOptions1.checkAll = nowLength == this.options.length;
				this.$forceUpdate();
			},
			changeDCU2() {
				const nowLength = this.dateForm2.DCU.length;
				this.checkOptions2.isIndeterminate =
					nowLength > 0 && nowLength < this.yjoptions.length;
				this.checkOptions2.checkAll = nowLength == this.yjoptions.length;
				this.$forceUpdate();
			},
			//自学习
			getSelfLearning() {
				if(this.dateForm1.DCU.length==0){
					this.$message.error('请选择门控单元编号');
					return false
				}
				var dcuId = [];
				for (var i = 0; i < this.dateForm1.DCU.length; i++) {
					for (var j = 0; j < this.options.length; j++) {
						if (Number(this.dateForm1.DCU[i]) == this.options[j].dcu && this.options[j].stationSide == 1) {
							let num1 = Number(this.dateForm1.DCU[i]) - this.stepUp;
							dcuId.push(num1);
						} else if (Number(this.dateForm1.DCU[i]) == this.options[j].dcu && this.options[j].stationSide ==
							0) {
							let num1 = Number(this.dateForm1.DCU[i]) - this.stepDown + 128;
							dcuId.push(num1);
						}
					}
				}
				var obj = {
					"dcuArr": dcuId
				}
				this.$http.post(`/psc/dcu/autLearn`, obj).then((res) => {
					if (res.data.code !== 0) {
						return this.$message.error(res.data.msg);
					}
					this.$message({
						message: this.$t('prompt.success'),
						type: 'success',
						duration: 500,
						onClose: () => {

						}
					})
				});
			},
			//应急门的配置
			yjSetting() {
				this.$http.get(`/psc/dcu/emergencyDoorConfig`).then((res) => {
					if (res.data.code !== 0) {
						return this.$message.error(res.data.msg);
					}
					this.$message({
						message: this.$t('prompt.success'),
						type: 'success',
						duration: 500,
						onClose: () => {

						}
					})
				});
			},
			
			//改变站台测的上下行
			changeStation() {
				this.getdoorList();
			},
			//写入DCU
			writeDCUNew: debounce(
				function() {
					this.$confirm('此操作将写入DCU参数, 是否继续?', '提示', {
						confirmButtonText: '确定',
						cancelButtonText: '取消',
						type: 'warning'
					}).then(() => {
						if (this.doorForm.dcu.length !== 0) {
							this.readDataStatus = false
							if (this.baseForm.buzzerGearSetting > 3 || this.baseForm.elockGearSetting > 3) {
								this.baseForm.buzzerGearSetting = "";
								this.baseForm.elockGearSetting = "";
								return this.$message.error("蜂鸣器音量和电磁锁档位不能大于三档");
								return false
							}
							var obj = this.paramObj();
							this.$http.post("/psc/dcu/writeDcuParams", obj).then((res) => {
								if (res.data.code !== 0) {
									this.defaultStatus = true
									//恢复读取值
									this.getDCUCS()
									return this.$message.error(res.data.msg);
								}
								this.$message({
									message: this.$t("prompt.success"),
									type: "success",
									duration: 500,
									onClose: () => {
										this.visible = false;
										this.defaultStatus = true
										//恢复读取值
										this.getDCUCS()
									},
								});
							});
						} else {
							return this.$message.error("请选择门控单元编号");
						}
					}).catch(() => {
						this.$message({
							type: 'info',
							message: '已取消写入DCU参数'
						});
						this.defaultStatus = true
						//恢复读取值
						this.getDCUCS()
						
						
					});

				},
				500, {
					leading: true,
					trailing: false,
				}
			),
			//加载
			historyLoad() {
				if (this.doorForm.dcu.length > 1) {
					this.$message({
						message: "门控制单元编号只能选一个",
						type: "error",
						duration: 2000,
					});
				} else {
					this.historyVisible = true;
					this.$nextTick(() => {
						this.$refs.historyForm.init();
					});
				}
			},
			//获取历史保存的数据
			getHistory(id) {
				// console.log(id, '保存的id值')
				this.$http.get(`/psc/dcuparameters/${id}`).then((res) => {
					if (res.data.code == 0 && res.data.data !== null) {
						this.$nextTick(() => {
							this.getData(res.data.data);
						});
					}
				});
			},
			// 保存数据
			save() {
				if (this.doorForm.dcu.length !== 0) {
					this.saveVisible = true;
					this.$nextTick(() => {
						this.$refs["saveForm"].resetFields();
					});
				} else {
					return this.$message.error("请选择门控单元编号");
				}
			},
			//保存数据确定
			confirm() {
				this.$refs["saveForm"].validate((valid) => {
					if (!valid) {
						return false;
					}
					var obj = this.paramObj();
					obj = {
						name: this.saveForm.name,
						...obj,
					};
					this.$http.post("/psc/dcuparameters", obj).then((res) => {
						if (res.data.code !== 0) {
							this.defaultStatus = true
							//恢复读取值
							this.getDCUCS()
							return this.$message.error(res.msg);
						}
						this.$message({
							message: this.$t("prompt.success"),
							type: "success",
							duration: 500,
							onClose: () => {
								this.saveVisible = false;
								this.defaultStatus = true
								//恢复读取值
								this.getDCUCS()
							},
						});
					});
				});
			},
			//存储数据专用
			paramObj() {
				var obj = {
					dcuArr: this.returnDoorId(),
					...this.baseForm,
				};
				console.log(obj, "数值显示");
				return obj;
			},
			//返回相对应的门的ID
			returnDoorId() {
				var doorNum = [];
				for (var i = 0; i < this.doorForm.dcu.length; i++) {
					for (var j = 0; j < this.options.length; j++) {
						if (Number(this.doorForm.dcu[i]) == this.options[j].dcu && this.options[j].stationSide == 1) {
							let num1 = Number(this.doorForm.dcu[i]) - this.stepUp;
							doorNum.push(num1);
						} else if (Number(this.doorForm.dcu[i]) == this.options[j].dcu && this.options[j].stationSide ==
							0) {
							let num1 = Number(this.doorForm.dcu[i]) - this.stepDown + 128;
							doorNum.push(num1);
						}
					}
				}
				return doorNum;
			},
			//读取DCU编号
			getDCUData: debounce(
				function() {
					// console.log(this.doorForm.dcu, "jzxijsix");
					this.readDataStatus = true
					if (this.doorForm.dcu.length > 1) {
						return this.$message.error("门控制单元编号只能选一个");
					} else if (this.doorForm.dcu.length == 0) {
						return this.$message.error("请选择门控单元编号");
					} else {
						// this.getDefalutObj()
						this.getDCUCS();
					}
				},
				500, {
					leading: true,
					trailing: false,
				}
			),
			//获取DCU初始值
			getDCUCS() {
				this.$http
					.get("/psc/dcu/readCurrentDcu/" + this.returnDoorId()[0])
					.then((res) => {
						// console.log(res, "0000000000000");
						if (res.data.code !== 0) {
							if (!this.defaultStatus) {
								return this.$message.error(res.data.msg);
							}
							this.returnObj()
						}
						if (res.data.code == 0 && res.data.data !== null) {
							if (!this.defaultStatus) {
								this.$message({
									message: this.$t("prompt.success"),
									type: "success",
									duration: 500,
								});
							}
							this.getData(res.data.data);
							// this.getData(res.data.data.dcuParametersDTO, res.data.data.sysDcuState)
							// // 版本号
							// this.baseForm.version = res.data.data.sysDcuState.version
						}
					});
			},
			getDefalutObj() {
				this.baseForm.leftNowel = 10;
				this.baseForm.rightNowel = 10;
				this.baseForm.closeImpact = 10;
				this.baseForm.openImpact = 10;
				this.baseForm.encounterNowel = 4;
				this.baseForm.encounterRegressionDistance = 4;
				this.baseForm.closeEncounterNum = 4;
				this.baseForm.openEncounterNum = 4;
				this.baseForm.closeEncounterTime = 4;
				this.baseForm.openEncounterTime = 4;
				this.baseForm.macloseTime = 5;
				this.baseForm.overProThre = 6;
				this.baseForm.endAlarmTime = 7;
				this.baseForm.buzzerGearSetting = 2;
				this.baseForm.elockGearSetting = 2;
				this.baseForm.isHaveEmergencyDoor = 0
			},
			//读取生产日期
			getDateData() {
				if(!this.dateForm.DCU){
					this.$message.error('请选择门控单元编号');
					return false
				}
				var dcuId = "";
				if (this.stationSide == 1) {
					dcuId = this.dateForm.DCU - this.stepUp;
				}
				if (this.stationSide == 0) {
					dcuId = Number(this.dateForm.DCU) - this.stepDown + 128;
				}
				this.getdoorVersion(dcuId);
			},
			// 获取生产日期
			getdoorDate(dcuId) {
				this.$http.get(`/psc/dcu/readYmd/` + dcuId).then((res) => {
					if (res.data.code !== 0) {
						return this.$message.error(res.data.msg);
					}
					this.dateForm.date = res.data.data;
				});
			},
			//获取版本号
			getdoorVersion(dcuId) {
				let _this = this
				this.version = ''
				this.version1 = ''
				this.$http.get(`/psc/dcu/readVersion/` + dcuId).then((res) => {
					if (res.data.code !== 0) {
						this.returnObjVersion()
						return this.$message.error(res.data.msg);
					}
					this.$message({
						message: this.$t("prompt.success"),
						type: "success",
						duration: 500,
						onClose: () => {
							_this.version = res.data.data.cpu0;
							_this.version1 = res.data.data.cpu1;
						},
					});

				});
			},
			returnObjVersion() {
				this.version = ''
				this.version1 = ''
			},
			//删除DCU的升级包
			deleteHandleDCU(id) {
				this.$confirm(
					this.$t("prompt.info", {
						handle: this.$t("delete"),
					}),
					this.$t("prompt.title"), {
						confirmButtonText: this.$t("confirm"),
						cancelButtonText: this.$t("cancel"),
						type: "warning",
					}
				).then(() => {
					var obj = {
						id: id,
						isDel: 1,
					};
					this.$http.put(`/psc/packagemanage`, obj).then((res) => {
						if (res.data.code !== 0) {
							return this.$message.error(res.msg);
						}
						this.$message({
							message: this.$t("prompt.success"),
							type: "success",
							duration: 500,
							onClose: () => {
								this.getDCUpackageList();
							},
						});
					});
				});
			},
			//获取dcu升级包
			getDCUpackageList(callback) {
				this.dataListLoading = true;
				this.dataList = []
				this.$http
					.get("/psc/packagemanage/dcu", {}).then(({
						data: res
					}) => {
						this.dataListLoading = false;
						if (res.code !== 0) {
							this.dataList = [];
							this.total = 0;
							return this.$message.error(res.msg);
						}
						this.dataList.push(res.data)
						// this.dataList = res.data.list;
						// this.total = res.data.total;
						this.dataList.forEach((item, index) => {
							this.$set(this.dataList[index], "doorList", "");
						});
						callback();
					});
			},
			//获取基础参数
			getData(val, val1) {
				this.baseForm.leftNowel = val.leftNowel;
				this.baseForm.rightNowel = val.rightNowel;
				this.baseForm.closeTime = val.closeTime;
				this.baseForm.openTime = val.openTime;
				this.baseForm.slowCloseTime = val.slowCloseTime;
				this.baseForm.slowOpenTime = val.slowOpenTime;
				this.baseForm.closeImpact = val.closeImpact;
				this.baseForm.openImpact = val.openImpact;
				this.baseForm.encounterNowel = val.encounterNowel;
				this.baseForm.encounterRegressionDistance =
					val.encounterRegressionDistance;
				this.baseForm.closeEncounterNum = val.closeEncounterNum;
				this.baseForm.openEncounterNum = val.openEncounterNum;
				this.baseForm.closeEncounterTime = val.closeEncounterTime;
				this.baseForm.openEncounterTime = val.openEncounterTime;
				this.baseForm.lockTime = val.lockTime;
				this.baseForm.macloseTime = val.macloseTime;
				this.baseForm.overProThre = val.overProThre;
				this.baseForm.endAlarmTime = val.endAlarmTime;
				this.baseForm.buzzerGearSetting = val.buzzerGearSetting;
				this.baseForm.elockGearSetting = val.elockGearSetting;
				this.baseForm.isHaveEmergencyDoor = val.isHaveEmergencyDoor
			},
			returnObj() {
				this.baseForm.leftNowel = undefined;
				this.baseForm.rightNowel = undefined;
				this.baseForm.closeTime = undefined;
				this.baseForm.openTime = undefined;
				this.baseForm.slowCloseTime = undefined;
				this.baseForm.slowOpenTime = undefined;
				this.baseForm.closeImpact = undefined;
				this.baseForm.openImpact = undefined;
				this.baseForm.encounterNowel = undefined;
				this.baseForm.encounterRegressionDistance = undefined;
				this.baseForm.closeEncounterNum = undefined;
				this.baseForm.openEncounterNum = undefined;
				this.baseForm.closeEncounterTime = undefined;
				this.baseForm.openEncounterTime = undefined;
				this.baseForm.lockTime = undefined;
				this.baseForm.macloseTime = undefined;
				this.baseForm.overProThre = undefined;
				this.baseForm.endAlarmTime = undefined;
				this.baseForm.buzzerGearSetting = undefined;
				this.baseForm.elockGearSetting = undefined;
				this.baseForm.isHaveEmergencyDoor = 0
			},
			//接收websocket数据
			handleMsgPSC() {
				//this.$globalWebSocket.ws.send("psc");
				//this.$globalWebSocket.ws.onmessage = this.getMessagePSC
			},

			//websocket通讯
			handleMsg() {
				this.$globalWebSocket.ws1.send("DCU");
				this.$globalWebSocket.ws1.onmessage = this.getMessage;
			},
			//获取通讯
			getMessage(e) {
				// console.log(e);
				var message = JSON.parse(e.data);
				if (message.failDcuId && message.failDcuId !== 0) {
					var doorId = this.returnId(message.failDcuId);
					if (doorId != undefined) {
						this.Arr.push(doorId);
					}
					let uniqueArray = this.Arr.filter((item, index, array) => {
						return array.indexOf(item) === index;
					});
					this.dataList.forEach((item, index) => {
						if (item.id == this.updateId) {
							this.$set(this.dataList[index], "doorList", uniqueArray); //获取失败的门编号
						}
					});
				}
				if (message.process !== undefined) {
					this.jdNumber = message.process + '%'
				}
			},
			returnId(id) {
				if (id < 42) {
					id = id + this.stepUp;
				} else if (id > 128) {
					id = id - 128 + this.stepDown;
				}
				return id;
			},
			//每次升级dcu,清空一下失败门编号
			clearData(val) {
				if (val == 1) {
					this.dataList.forEach((item, index) => {
						if (item.id == this.updateId) {
							this.$set(this.dataList[index], "doorList", ''); //获取失败的门编号
						}
					});
				}
			},
			//记录版版本号
			getJLBData() {
				console.log(this.jlbForm.jlbData,'选择数据')
				if(!this.jlbForm.jlbData){
					this.$message.error('请选择配置');
					return false
				}
				this.$http.get(`psc/dcu/readRecordVersion/`+this.jlbForm.jlbData).then((res) => {
					if (res.data.code !== 0) {
						return this.$message.error(res.data.msg);
					}
					this.versionJL = res.data.data.cpu0;
					this.versionJL1 = res.data.data.cpu1;
				});
			}
		},
	};
</script>

<style scoped>
	.bg {
		background-color: #fff;
		border-radius: 10px;
		display: flex;
		align-items: center;
		height: 7.6vh;
		line-height: 7.6vh;
		padding: 0 1.8vw;
	}

	.bg>>>.el-form--inline .el-form-item__content,
	.el-form--inline .el-form-item {
		vertical-align: middle !important;
	}

	.bg>>>.el-form-item {
		margin-bottom: 0;
	}

	.bg1 {
		background-color: #fff;
		border-radius: 10px;
		display: flex;
		align-items: center;
		/* height: 83.1vh; */
		/* height: 71vh; */
		padding: 2.1vh 1.5vw;
		margin-top: 10px;
	}

	.homeTuTxt {
		width: 16px;
		font-size: 18px;
		font-weight: 400;
		word-wrap: break-word;
		word-break: normal;
		line-height: 40px;
		color: rgba(0, 65, 135, 1);
	}

	.bg1 .el-col {
		height: 100%;
	}

	.baseHeader {
		margin: 0;
		font-size: 18px;
		font-weight: 500;
		color: rgba(46, 48, 51, 1);
	}

	.baseHeader1 {
		text-align: left;
		font-size: 16px;
		display: flex;
		align-items: center;
	}

	.dcuTxt {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 10px;
	}


	.baseInfo {
		display: flex;
		width: 100%;
		/* height: 64vh; */
		padding: 0 2.1vw;
		/* background: rgba(0, 123, 255, 0.1); */
		border-radius: 10px;
		align-items: center;
		margin-top: 1.3vh;
	}

	.baseInfozd {
		height: 34.3vh;
	}

	.baseInfoContent {
		width: 100%;
		height: 100%;
		/* padding-left: 1.9vw; */
	}

	.baseInfoContent>>>.el-row {
		display: flex;
		/* justify-content: space-between; */
	}

	.baseInfoContent>>>.el-input__inner {
		height: 100%;
		text-align: center;
		padding: 0;
	}

	.baseInfoContent>>>.el-form--inline .el-form-item__content,
	.el-form--inline .el-form-item {
		vertical-align: middle !important;
	}

	.baseInfoContent>>>.el-form-item {
		margin-bottom: 0;
	}

	.baseInfoContent>>>.el-form {
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-evenly;
	}

	.baseInfo1 {
		width: 50%;
		display: flex;
		justify-content: flex-start;
		position: relative;
	}

	.baseInfo1>>>.el-form-item__label {
		/* width: 11vw; */
		width: 180px;
		font-size: 14px;
		font-weight: 400;
		color: rgba(46, 48, 51, 1);
	}

	.company {
		width: 2.5vw;
		height: 2.7vh;
		line-height: 2.7vh;
		margin-top: 0.8vh;
		font-size: 14px;
	}

	.baseInfo2 {
		padding-left: 11vw;
	}

	.baseInfo2 div {
		width: 7.8vw;
		display: flex;
		justify-content: center;
	}

	.baseInfoBtn>>>.el-button--primary:focus,
	.baseInfoBtn>>>.el-button--primary:hover {
		border-radius: 10px;
		background: rgba(25, 77, 138, 1) !important;
	}

	.baseInfoBtn>>>.el-button--primary {
		border-radius: 10px;
		background: rgba(25, 77, 138, 1) !important;
		font-size: 16px;
		font-weight: 400;
		color: rgba(255, 255, 255, 1);
	}

	.baseInfoBtnAll {
		width: 95%;
		justify-content: flex-end;
	}

	.danwei {
		font-size: 14px;
		font-weight: 400;
		color: rgba(46, 48, 51, 1);
	}

	.baseInfoBtnRight {
		position: absolute;
		right: 1.8vw;
		top: 2vh;
		height: 96%;
		width: 7.8vw;
	}

	.baseInfoBtnRight .baseInfoBtn {
		display: flex;
		flex-direction: column;
		height: 100%;
		justify-content: space-evenly;
	}

	.baseInfoBtnRight>>>.baseInfoBtn1,
	.PEDCBtn>>>.baseInfoBtn1,
	.PEDCInfo>>>.baseInfoBtn1 {
		background: rgba(42, 130, 228, 1) !important;
		border-color: rgba(42, 130, 228, 1) !important;
	}

	.baseInfoBtnRight>>>.baseInfoBtn1:focus,
	.baseInfoBtnRight>>>.baseInfoBtn1:hover,
	.PEDCBtn>>>.baseInfoBtn1:focus,
	.PEDCBtn>>>.baseInfoBtn1:hover,
	.PEDCInfo>>>.baseInfoBtn1:focus,
	.PEDCInfo>>>.baseInfoBtn1:hover {
		background: rgba(42, 130, 228, 1) !important;
		border-color: rgba(42, 130, 228, 1) !important;
	}

	.baseInfoBtnRight>>>.baseInfoBtn2,
	.PEDCBtn>>>.baseInfoBtn2,
	.PEDCInfo>>>.baseInfoBtn2 {
		background: rgba(255, 87, 51, 1) !important;
		border-color: rgba(255, 87, 51, 1) !important;
	}

	.baseInfoBtnRight>>>.baseInfoBtn2:focus,
	.baseInfoBtnRight>>>.baseInfoBtn2:hover,
	.PEDCBtn>>>.baseInfoBtn2:focus,
	.PEDCBtn>>>.baseInfoBtn2:hover,
	.PEDCInfo>>>.baseInfoBtn2:focus,
	.PEDCInfo>>>.baseInfoBtn2:hover {
		background: rgba(255, 87, 51, 1) !important;
		border-color: rgba(255, 87, 51, 1) !important;
	}

	.baseInfoBtnRight>>>.baseInfoBtn3 {
		background: rgba(67, 207, 124, 1) !important;
		border-color: rgba(67, 207, 124, 1) !important;
	}

	.baseInfoBtnRight>>>.baseInfoBtn3:focus,
	.baseInfoBtnRight>>>.baseInfoBtn3:hover {
		background: rgba(67, 207, 124, 1) !important;
		border-color: rgba(67, 207, 124, 1) !important;
	}

	.baseInfoBtnRight>>>.baseInfoBtn4 {
		background: rgba(56, 56, 56, 1) !important;
		border-color: rgba(56, 56, 56, 1) !important;
	}

	.baseInfoBtnRight>>>.baseInfoBtn4:focus,
	.baseInfoBtnRight>>>.baseInfoBtn4:hover {
		background: rgba(56, 56, 56, 1) !important;
		border-color: rgba(56, 56, 56, 1) !important;
	}

	.baseInfoBtnRight>>>.el-button {
		padding: 10px 12px;
	}

	.bg2 {
		background-color: #fff;
		border-radius: 10px;
		padding: 2.1vh 1.5vw;
		margin-top: 10px;
		height: 38.1vh;
	}

	.bg3 {
		height: auto !important;
	}

	.bg4 {
		height: 5vh;
		padding: 0;
		line-height: 5vh;
		padding: 0 1.5vw;
	}

	.bg3>>>.el-row {
		height: 100%;
	}

	.PEDCInfo {
		padding: 2vh 2.1vw 0;
		height: calc(100% - 23px);
		display: flex;
		align-items: center;
	}

	.PEDCBtn {
		display: flex;
	}

	.baseInfoEcharts {
		width: 100%;
		height: calc(100% - 23px);
	}

	.doorNuTxt>>>.el-input {
		height: 100%;
		line-height: 35px;
	}

	.doorNu1 {
		justify-content: flex-start;
	}

	.baseInfoBtn>>>.btn1 {
		font-size: 14px;
		font-weight: 400;
		border-radius: 5px;
		color: rgba(255, 255, 255, 1);
		background: rgba(255, 195, 0, 1) !important;
		border-color: rgba(255, 195, 0, 1) !important;
	}

	.baseInfoBtn>>>.btn1:focus,
	.baseInfoBtn>>>.btn1:hover {
		background: rgba(255, 195, 0, 0.8) !important;
		border-color: rgba(255, 195, 0, 1) !important;
		border-radius: 5px !important;
	}

	.baseInfoBtn>>>.btn2 {
		font-size: 14px;
		font-weight: 400;
		border-radius: 5px;
		color: rgba(255, 255, 255, 1);
		background: rgba(67, 207, 124, 1) !important;
		border-color: rgba(67, 207, 124, 1) !important;
	}

	.baseInfoBtn>>>.btn2:focus,
	.baseInfoBtn>>>.btn2:hover {
		background: rgba(67, 207, 124, 1) !important;
		border-color: rgba(67, 207, 124, 1) !important;
		border-radius: 5px !important;
	}

	.baseInfoBtn>>>.btn3 {
		font-size: 14px;
		font-weight: 400;
		border-radius: 5px;
		color: rgba(255, 255, 255, 1);
		background: rgba(255, 141, 26, 1) !important;
		border-color: rgba(255, 141, 26, 1) !important;
	}

	.baseInfoBtn>>>.btn3:focus,
	.baseInfoBtn>>>.btn3:hover {
		background: rgba(255, 141, 26, 1) !important;
		border-color: rgba(255, 141, 26, 1) !important;
		border-radius: 5px !important;
	}

	.baseInfoBtn>>>.btn4,
	.baseInfoBtn>>>.btn5 {
		font-size: 14px;
		font-weight: 400;
		border-radius: 5px;
		color: rgba(255, 255, 255, 1);
		background: rgba(66, 177, 255, 1) !important;
		border-color: rgba(66, 177, 255, 1) !important;
	}

	.baseInfoBtn>>>.btn4:focus,
	.baseInfoBtn>>>.btn4:hover,
	.baseInfoBtn>>>.btn5:focus,
	.baseInfoBtn>>>.btn5:hover {
		background: rgba(66, 177, 255, 0.8) !important;
		border-color: rgba(66, 177, 255, 1) !important;
		border-radius: 5px !important;
	}

	.baseInfoBtn>>>.btn6,
	.baseInfoBtn>>>.btn8 {
		font-size: 14px;
		font-weight: 400;
		border-radius: 5px;
		color: rgba(255, 255, 255, 1);
		background: rgba(67, 207, 124, 1) !important;
		border-color: rgba(67, 207, 124, 1) !important;
	}

	.baseInfoBtn>>>.btn6:focus,
	.baseInfoBtn>>>.btn6:hover,
	.baseInfoBtn>>>.btn8:focus,
	.baseInfoBtn>>>.btn8:hover {
		border-radius: 5px !important;
		background: rgba(67, 207, 124, 0.8) !important;
		border-color: rgba(67, 207, 124, 1) !important;
	}

	.baseInfoBtn>>>.btn7 {
		font-size: 14px;
		font-weight: 400;
		border-radius: 5px;
		color: rgba(255, 255, 255, 1);
		background: rgba(255, 141, 26, 1) !important;
		border-color: rgba(255, 141, 26, 1) !important;
	}

	.baseInfoBtn>>>.btn7:focus,
	.baseInfoBtn>>>.btn7:hover {
		border-radius: 5px !important;
		background: rgba(255, 141, 26, 0.8) !important;
		border-color: rgba(255, 141, 26, 1) !important;
	}

	.baseS {
		margin-left: 2vw;
	}

	.PEDCInfo>>>.el-form-item__label {
		text-align: left;
	}

	.baseInfo>>>.el-form-item--default {
		margin-bottom: 0px !important;
	}

	.progress-bar {
		width: 100%;
		height: 30px;
		overflow: hidden;
		box-sizing: border-box;
		border-radius: 24px;
		background-color: rgba(180, 160, 120, 0.2);
		position: relative;
	}

	.progress-bg {
		width: 0;
		height: 100%;
		overflow: hidden;
		box-sizing: border-box;
		background: rgba(67, 207, 124, 1);
		border-radius: 24px;
		/* animation: panoramic 2s linear infinite;
	  background-size: 32px 100%; */
	}

	.baseInfo1>>>.el-input-number__decrease,
	.baseInfo1>>>.el-input-number__increase {
		height: 94%;
		margin-top: 1%;
		display: none;
	}

	.baseInfo1>>>.el-input-number .el-input {
		height: 100%;
	}

	.company1 {
		position: absolute;
		left: 380px;
		white-space: nowrap;
	}

	.input-width {
		width: 7.8vw;
		height: 3.5vh;
		min-height: 30px;
		min-width: 150px;
	}

	/* @keyframes panoramic{
	  to {
	    width: 100%;
	  }
	} */
</style>